<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-1.12.4.js" type="text/javascript"></script>
</head>
<body>
    <h1>用户登录</h1>
    <form id="frm">

      <input type="text" name="uname" id="uname"> <br>
      <input type="password" name="upass" id="upass"> <br>
      <input type="button" value="登录" id="btn_login"><br>
    </form>

    <script type="text/javascript">
        $("#btn_login").click(function (){
           let formDate = $("#frm").serialize();

           $.post("login",formDate,function (res){
                console.log(res)
           })

        })



    </script>
</body>
</html>